Skip to content

Conversation

gaearon
Copy link
Member

@gaearon gaearon commented Oct 1, 2025

Sandpack is just broken for some reason

Copy link

github-actions bot commented Oct 1, 2025

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 110.54 KB (-1 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Five Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/404 128.07 KB (🟢 -17 B) 238.61 KB
/500 128.08 KB (🟢 -17 B) 238.62 KB
/[[...markdownPath]] 130.53 KB (🟢 -17 B) 241.07 KB
/errors 128.33 KB (🟢 -17 B) 238.87 KB
/errors/[errorCode] 128.3 KB (🟢 -17 B) 238.84 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@webbertakken
Copy link

@gaearon I'm not getting 15.2 to work locally either. Could it be a bug in the lib instead of sandpack?

Exploring the react package, I only see types for Activity and such, no implementation. Not sure if that's expected?

@gaearon
Copy link
Member Author

gaearon commented Oct 1, 2025

No, 19.2 itself should work fine: https://codesandbox.io/p/sandbox/36zsm3

@webbertakken
Copy link

Yes, it works as expected: sandbox fork

@gaearon
Copy link
Member Author

gaearon commented Oct 2, 2025

Filed codesandbox/sandpack-cdn#43 for possible root cause, idk what's wrong though

@webbertakken
Copy link

I'm getting the same locally in my next app. Here's a sentry log of it.

The %o and %s represent a DOM Element and a string.

I'm using next dev without the --turbo flag, meaning it's using webpack under the hood.

Not sure if that helps 🤷🏼

image

@gaearon
Copy link
Member Author

gaearon commented Oct 2, 2025

Please create a reproducing project, this is not necessarily related. Next includes a vendor copy of React so it might not have caught up with 19.2 yet.

@webbertakken
Copy link

webbertakken commented Oct 2, 2025

Here's a minimal repo to reproduce the issue in Next latest: https://github.com/webbertakken/repro-react-19-2-element-type-undefined

If I had to guess, I'd say it might have something to do with how some bundlers handle the exported Symbols.

@CompuIves
Copy link
Contributor

Looking into this!

@gaearon
Copy link
Member Author

gaearon commented Oct 2, 2025

@webbertakken I'm hearing from Next people that this is expected because Next hasn't done a stable release with 19.2 yet. It should work on canary. Next vendors its own copy of React so the versions in package.json have no effect.

@webbertakken
Copy link

Cool, thanks!

Looks like on the dev website it's also working now.

@CompuIves
Copy link
Contributor

I found the issue on our side. Due to an upgrade to the npm couchdb instance (https://github.com/orgs/community/discussions/152515) our npm registry replicator for sandpack cdn (which resolves dependency versions) does not completely sync anymore. Because of this, we cannot resolve semvers properly. I am writing a fix now.

@gaearon
Copy link
Member Author

gaearon commented Oct 2, 2025

Fantastic, thank you so much!

@CompuIves
Copy link
Contributor

Wrote a fix, the CDN is syncing now, I will make sure that it downloads new metadata in parallel to go faster. I will have an update on how long it'll take soon.

@CompuIves
Copy link
Contributor

CompuIves commented Oct 2, 2025

Okay, it works now! Manually synced react, react-dom and scheduler. We should be up to date with npm in about 1 hour. Apologies for this problem!!

Both existing (live examples) and the 19.2.0 references (this PR) now work.

@rickhanlonii rickhanlonii marked this pull request as ready for review October 2, 2025 13:29
@rickhanlonii rickhanlonii changed the title [Broken, do not merge] Upgrade sandboxes to 19.2 Upgrade sandboxes to 19.2 Oct 2, 2025
@rickhanlonii
Copy link
Member

Thanks @CompuIves!!!

Ok this is good to go, I needed to revert some of the package.json removals because they had deps on toastify, but I tested all the sandboxes and they're working. Here's a diff of only my changes.

@rickhanlonii
Copy link
Member

I did find one (existing) issue on the escape hatches page: #8045

@rickhanlonii rickhanlonii merged commit 9850724 into main Oct 2, 2025
6 checks passed
@rickhanlonii rickhanlonii deleted the unfix branch October 2, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants